function GSLoading () {
	var LOADING_BAR_SW = 780;
	var LOADING_BAR_SH = 106;
	var LOADING_BAR_DW = LOADING_BAR_SW;
	var LOADING_BAR_DH = LOADING_BAR_SH;
	var LOADING_BAR_X = (CANVAS_W - LOADING_BAR_DW) / 2;
	var LOADING_BAR_Y = (CANVAS_H - LOADING_BAR_DH) / 2;
	
	var LOADING_BAR_E_SX = 0;
	var LOADING_BAR_E_SY = 0;
	var LOADING_BAR_F_SX = 0;
	var LOADING_BAR_F_SY = 106;
	
	var loadingBarImageHandle;
	var loadingBGHandle;
	var loadbarProgress = 0;
	
	
		
	this.Init = function () {
		// Load the loading bar
		loadingBGHandle = g_graphicEngine.LoadImage("Data/LoadingScreen/LoadBG.jpg");
		loadingBarImageHandle = g_graphicEngine.LoadImage("Data/LoadingScreen/LoadingBar.png");
	}
	
	this.Update = function () {
		loadbarProgress += g_deltaTime * 0.001;
		if (loadbarProgress >= 1) 
		{
			loadbarProgress = 1;
			SwitchState (g_gsMainMenu, true);
		}
	}
	
	this.Draw = function () {
		g_graphicEngine.DrawFast (g_context, loadingBGHandle, 0, 0);
		
		g_graphicEngine.Draw (g_context, loadingBarImageHandle, LOADING_BAR_E_SX + (LOADING_BAR_SW * loadbarProgress) >> 0, LOADING_BAR_E_SY, LOADING_BAR_SW - (LOADING_BAR_SW * loadbarProgress) >> 0, LOADING_BAR_SH, LOADING_BAR_X + (LOADING_BAR_SW * loadbarProgress) >> 0, LOADING_BAR_Y, LOADING_BAR_DW - (LOADING_BAR_SW * loadbarProgress) >> 0, LOADING_BAR_DH);
		g_graphicEngine.Draw (g_context, loadingBarImageHandle, LOADING_BAR_F_SX, LOADING_BAR_F_SY, (LOADING_BAR_SW * loadbarProgress) >> 0, LOADING_BAR_SH, LOADING_BAR_X, LOADING_BAR_Y, (LOADING_BAR_DW * loadbarProgress) >> 0, LOADING_BAR_DH);
	}
	
	this.OnSwitch = function () {
		// When switch to loading screen, init all other state to pre-cache the data
		g_gsMainMenu.Init();
	}
	
	this.OnMouseMove = function (x, y) {
	
	}
	
	this.OnMouseDown = function (x, y) {
	
	}
	
	this.OnMouseUp = function (x, y) {
	
	}
	
	this.OnMouseWheel = function (delta) {
	
	}
	
	this.OnKeyDown = function (keycode) {
	
	}
	
	this.OnKeyUp = function (keycode) {
	
	}
}
